﻿using LPLS.Commons.DBModule;
using LPLS.Commons.Enums;
using LPLS.DBEntities.ConfigModels.AlarmModels;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LPLS.DBEntities.ConfigModels.DeviceInfoModels
{

    [DatabaseKey(DatabaseEnum.SqliteConfig)]
    [SugarTable("DeviceBaseInfo")]
    /// <summary>
    /// 设备基础信息模型
    /// </summary>
   public  class DeviceBaseInfo
    {


        [SugarColumn(IsPrimaryKey = true)]
        public Guid  ID { get; set; }=Guid.NewGuid ();

        /// <summary>
        /// 设备名称
        /// </summary>
        public string DeviceName { get; set; }
        /// <summary>
        /// 设备类型
        /// </summary>
        public DeviceTypeEnum DeviceType { get; set; }

        [SugarColumn(IsIgnore =true)]
        public string DeviceTypeName { get; set; }
        [SugarColumn(IsNullable =true)]

        public string DeviceDescription { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(DeviceComponentInfo.DeviceBaseInfoID))]
        public List<DeviceComponentInfo> DeviceComponents { get; set; } 
    }
}
